package com.academy.services;

import org.apache.http.impl.client.DefaultHttpClient;

public class DefaultClient 
{
	/**
	 * Single ton class is used to get one instance for DefaultHttpClient.
	 */
	private static DefaultHttpClient defaultHttpClient;
	static DefaultClient defaultClient;
	private DefaultClient()
	{
		defaultHttpClient = new DefaultHttpClient();
		
	}
	public static DefaultClient getInstance()
	{
		if(defaultClient == null)
		{
			defaultClient = new DefaultClient();
			
		}
		return defaultClient;
	}
	@SuppressWarnings("static-access")
	public DefaultHttpClient getHttpClient() 
	{
		return defaultClient.defaultHttpClient;
	}

}
